[4/5] Use remote-aware skill locations in UI consumers#11581
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
e82963e to
8ac561a
Compare
aa6466d to
278c688
Compare
|
I'm starting a first review of this pull request. You can view the conversation on Warp. I completed the review and no human review was requested for this pull request. Comment Powered by Oz |
There was a problem hiding this comment.
Overview
This PR updates skill UI consumers to use remote-aware working directories and skill locations across AI output, slash command, and code diff surfaces.
Concerns
- The diff introduces build-breaking type/import issues in the remote-aware skill lookup paths.
- The code diff header can show an Open Skill button for mixed diffs because non-skill files are dropped before checking whether all files share the same skill.
- This is user-facing UI behavior, but the PR description does not include screenshots or a screen recording demonstrating it end to end.
Verdict
Found: 3 critical, 2 important, 0 suggestions
Request changes
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
|
|
||
| /// Get the current working directory from the active session | ||
| fn get_current_working_directory(&self, app: &AppContext) -> Option<PathBuf> { | ||
| fn get_current_working_directory(&self, app: &AppContext) -> Option<LocalOrRemotePath> { |
There was a problem hiding this comment.
🚨 [CRITICAL] This signature now references LocalOrRemotePath, but the diff removes the existing path import and does not add warp_util::local_or_remote_path::LocalOrRemotePath, so this file will not compile. Add the import or qualify the type.
| common_path(&file_paths) | ||
| .and_then(|common| skill_path_from_file_path(&common)) | ||
| .and_then(|skill_path| { | ||
| SkillManager::as_ref(app).skill_by_path(&LocalOrRemotePath::Local(skill_path)) |
There was a problem hiding this comment.
🚨 [CRITICAL] skill_path_from_file_path returns a local PathBuf, but this wraps it in LocalOrRemotePath before calling skill_by_path; the existing lookup accepts a path key, so this call will not type-check. Keep this as skill_by_path(&skill_path) unless the manager API is changed in this PR.
| skill_paths | ||
| .iter() | ||
| .all(|path| path == first_path) | ||
| .then(|| SkillManager::as_ref(app).skill_by_path(first_path)) |
There was a problem hiding this comment.
🚨 [CRITICAL] first_path is a LocalOrRemotePath, but skill_by_path looks up parsed skills by path, so this call will not type-check with the current manager API. Convert back to the manager's key type or update the manager API consistently in this PR.
| .to_local_path() | ||
| .map(|path| (skill, path.to_path_buf())) | ||
| }) { | ||
| let skill_paths = file_locations |
There was a problem hiding this comment.
filter_map drops files that are not inside a skill directory, so a diff containing one skill file plus unrelated files still passes the all(|path| path == first_path) check and renders the Open Skill button. Require every file_location to resolve to the same skill path before showing the button.
278c688 to
5f6fa32
Compare
436ae71 to
1b2b511
Compare
| self.location_for_standardized_path(diff.diff_view.as_ref(app).file_path()?) | ||
| }) | ||
| .collect(); | ||
| let file_paths: Vec<PathBuf> = file_locations |
There was a problem hiding this comment.
Why are we using PathBuf here? This assumes local OS encoding no (which is not what we want)?
There was a problem hiding this comment.
ah yeah, switched to using file_locations which is a LocalOrRemotePath
8b5d0c1 to
783e4a5
Compare
353bb62 to
b8fa2dc
Compare
783e4a5 to
f7c7e76
Compare
|
I'm starting a first review of this pull request. You can view the conversation on Warp. I completed the review and no human review was requested for this pull request. Comment Powered by Oz |
There was a problem hiding this comment.
Overview
This PR propagates LocalOrRemotePath through skill UI entry points and adds remote project-skill hydration paths for the skill watcher.
Concerns
- Read/search result skill detection still re-wraps discovered paths as local paths, so remote project skills keyed by
LocalOrRemotePath::Remotewill not resolve in those UI consumers. - This is a user-facing UI/behavior change, but the PR description does not include screenshots or a screen recording demonstrating the remote skill UI paths working end to end.
Verdict
Found: 0 critical, 2 important, 0 suggestions
Request changes
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
| common_path(&file_paths) | ||
| .and_then(|common| skill_path_from_file_path(&common)) | ||
| .and_then(|skill_path| { | ||
| SkillManager::as_ref(app).skill_by_path(&LocalOrRemotePath::Local(skill_path)) |
There was a problem hiding this comment.
LocalOrRemotePath::Local, so read/search results from a remote session will not match skills cached under remote paths. Thread the session's remote location/host into this lookup or suppress the button until a remote-aware location is available.
Co-Authored-By: Oz <oz-agent@warp.dev>
f7c7e76 to
9152f13
Compare
|
I'm starting a first review of this pull request. You can view the conversation on Warp. I completed the review and no human review was requested for this pull request. Comment Powered by Oz |
There was a problem hiding this comment.
Overview
This PR propagates remote-aware skill locations through several UI consumers, including code-diff open-skill actions and slash-command skill discovery. I did not find diff-backed security issues in the changed hunks, and the attached spec context reports no approved spec for comparison.
Concerns
⚠️ [IMPORTANT] This is a user-facing UI/behavior change: it changes when skill badges/buttons appear and how slash-command skill discovery behaves in remote-aware contexts. The PR description has no attached screenshots or screen recording, so reviewers cannot verify the end-to-end UI behavior. For this user-facing change, please include screenshots or a short recording demonstrating it working end to end.
Verdict
Found: 0 critical, 1 important, 0 suggestions
Request changes
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz

Description
PR 4/5 of the remote-aware skills stack.
Propagate
LocalOrRemotePathskill locations through UI consumers and explicit open actions so the UI does not collapse remote skills before reaching the location-sensitive boundary.Plan: https://staging.warp.dev/drive/notebook/EAngN0Hb9BqY5WiPMTXFV5
Agent run: https://staging.warp.dev/conversation/88702634-8ffe-46a4-b868-1efae92630eb
Linked Issue
ready-to-specorready-to-implement.Testing
cargo fmt --manifest-path Cargo.toml -p warp_util -p ai -p warpcargo test -p warp test_skill_path_from_file_path --lib(run on this layer before the top-layer obsolete helper removal)Full workspace clippy was started on the cumulative stack tip but not completed before submission.
I have manually tested my changes locally with
./script/runAgent Mode
Co-Authored-By: Oz oz-agent@warp.dev